num = {"a": "100", "b": "200", "c": "300"}
print(list(num.keys()))
print(list(num.values()))
num.setdefault("d", "400")
print(num)
num1 = "c"
if num1 in num:
    num[num1] = 400
    print(f"员工{num1}存在，工资已更新")
    print(num)
else:
    print(f"员工{num1}不存在，不能更新工资")
    print(num)
num2 = "c"
if num2 in num:
    num.pop("c")
    print(f"已删除{num2}")
    print(num)
else:
    print(f"{num2}不存在")
    print(num)
num3 = num["a"]
print(f"a的工资是{num3}")

scores = {"a": "94", "b": "90", "c": "70"}
print(list(scores.keys()))
print(list(scores.values()))
scores.setdefault("d", "66")
print(scores)
scores1 = "c"
if scores1 in scores:
    scores[scores1] = 75
    print(f"学生{scores1}存在，成绩已更新")
    print(scores)
else:
    print(f"学生{scores1}不存在，不能更新成绩")
    print(scores)
scores2 = "d"
if scores2 in num:
    del scores[scores2]
    print(f"已删除{scores2}")
    print(scores)
else:
    print(f"{scores2}不存在")
    print(scores)
scores3 = scores["a"]
print(f"a的工资是{scores3}")

number = input("请输入一个整数：")
result = ""
if number.isdigit():
    num = int(number)
    while num != 0:
        num1 = num % 2
        num = num // 2
        result = str(num1) + result
    if number == "0":
        result = "0"
    print(f"{number}二进制数是:{result}")
else:
    print(f"输入的{number}不是数字，请重新输入。")









